#encoding=utf-8
import MySQLdb

conn = MySQLdb.connect(
	host='127.0.0.1',
	port=3306,
	user='root',
	passwd='tiger',
	charset='utf8',
	db='spring7'
)
cur = conn.cursor()
#sql = "insert into test_user(name,age) values(%s,%s)"
#cur.executemany(sql,[
#	('张智泉',222),
#	('姚波长',3333),
#	('王伟',1232)
#])

list=cur.execute("SELECT * FROM test_user")
print list
info = cur.fetchmany(list)
for user in info:
	print user
cur.close()
conn.commit()

conn.close()